package com.lavender.transaction.mapper;

import com.lavender.transaction.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {

    User selectById(Long id);

    int deleteById(Long id);

    int insert(User record);

    int updateByIdSelective(User record);

    @Select("select * from user where user_id = #{userId}")
    User selectByUserId(User user);

    @Update("update user set password = #{password} where user_id = #{userId}")
    int updateByUserId(User user);

    @Delete("delete from user where user_id = #{userId}")
    int deleteByUserId(User user);

    @Delete("delete from user")
    int deleteAll();

}